package com.fanshuai.tree.quadtree;

public class Point {
    public long x, y;

    public Point(long x, long y) {
        this.x = x;
        this.y = y;
    }

    public double distance(Point pt) {
        long dx = pt.x - x;
        long dy = pt.y - y;
        return Math.sqrt(dx * dx + dy * dy);
    }

    @Override
    public String toString() {
        return "(" + x + ", " + y + ")";
    }
}
